package org.ws.lifebacklog.activity;

import java.util.List;

import org.ws.lifebacklog.R;
import org.ws.lifebacklog.db.DatabaseHelper;
import org.ws.lifebacklog.model.Task;
import org.ws.lifebacklog.util.Logger;
import org.ws.lifebacklog.view.ActionTabView;

import android.app.ActivityGroup;
import android.os.Bundle;

/**
 * @author exebichi
 * 
 */
public class MainTabActivity extends ActivityGroup {

	private ActionTabView tabs;

	/** {@inheritDoc} */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tabs);
		DatabaseHelper dbHelper = new DatabaseHelper(getApplicationContext());

		List<Task> taskList = dbHelper.getTaskDao().getTasks();
		Logger.d(getClass(), " " + taskList.size());
		tabs = (ActionTabView) findViewById(R.id.action_tabs);
		tabs.setup(getLocalActivityManager());
		tabs.addItem(R.string.test, R.drawable.icon, TaskDetailsActivity.class);
		tabs.addItem(R.string.test, R.drawable.icon, TaskListActivity.class);
		tabs.addItem(R.string.test, R.drawable.icon, StatisticActivity.class);
		tabs.addItem(R.string.test, R.drawable.icon, FavouriteActivity.class);
		tabs.addItem(R.string.test, R.drawable.icon, Test1.class);
		tabs.addItem(R.string.test, R.drawable.icon, Test2.class);

	}
}
